<!DOCTYPE html>
<html>
<!-- Head -->
<head>
	<title>Contact</title>
	<!-- Meta-Tags -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="keywords" content="">
	<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
	<!-- //Meta-Tags -->
	<!-- Custom-Theme-Files -->
	<link rel="stylesheet" href="../css/bootstrap.min.css" type="text/css" media="all">
	<link rel="stylesheet" href="../css/style.css" type="text/css" media="all">
	<link rel="stylesheet" href="../css/font-awesome.min.css" />

	<!-- //Custom-Theme-Files -->
	<!-- Web-Fonts -->
	<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800" 	type="text/css">
	<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Montserrat:400,700" 				type="text/css">
	<!-- //Web-Fonts -->
	<!-- Default-JavaScript-File -->
	<script type="text/javascript" src="../js/jquery-2.1.4.min.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js"></script>
	<script src="../js/main.js"></script>
</head>
<body>
<!-- contact -->
<div class="agileits-con">
	<div class="contact-w3-agileits">
		<div class="container-fluid">
			<h2 class="w3ls_head">写下您宝贵的意见</h2>
			<div class="col-md-8 contact-w3layouts-left">
				<form action="">
					<textarea name="Comments" id="c_contact" placeholder="" required=""></textarea>
					<input type="submit" id="tijiao" value="发表评论">
				</form>
			</div>
			<div class="col-md-4 contact-w3layouts-right">
				<iframe name="frmMain" width=100% height=250 style="border:1px" src="/gotoContactIf"></iframe>
			</div>
		</div>
	</div>
</div>

</body>
<script>
	var u_name;
	$(document).ready(function() {
		getUserInfo();
		function getUserInfo() {
			$.ajax({
				url:"/user/getUserInfo",
				type:"post",
				dataType:"json",
				success:function (result) {
					u_name = result.object.u_name;
				}
			})
		}
		$("#tijiao").click(function(){
			$.ajax({
				url: "../contact/insertContact",
				type: "post",
				dataType: "json",
				data:{
					c_user:u_name,
					c_contact:$("#c_contact").val()
				},
			})
			alert("评论成功");
		})


	})
</script>
</html>